package com.eonmind.pay.dto;

import com.eonmind.common.contract.data.request.PageRequest;
import com.eonmind.common.provider.entity.pay.Order;
import com.eonmind.common.provider.entity.vip.VipPackage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

/**
 * @ClassName OrderDto
 * @Description TODO
 * Author 32004
 * Date 2025/5/16 20:47
 * Version 1.0
 **/

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderDto extends Order {

    List<OrderResDto> orderList;

    Long totalSize;

    Long pageSize;

    Long totalPage;

    Long pageNum;

    Long orderId;


    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class OrderResDto{

        List<OrderDetailDto> goodsList;

        Order order;

        //前端爆long类型溢出问题，传字符串
        String orderNo;
    }

    //订单详情对象
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class OrderDetailDto{

        private VipPackage menu;

        private Integer count;

    }

    @Data
    @ToString
    public static class OrderPageRequest{

        //商品名称
        private String productName;

        //订单状态
        private Integer status;

        //起始时间
        private Long startTime;

        //结束时间
        private Long endTime;

        //订单号
        private String orderNo;

        //分页参数
        private PageRequest page=new PageRequest();

    }
}
